<?php
  include("include/conn.php");
  require('include/Smarty/libs/Smarty.class.php');
  
  $bhatthipartyIdCount = "";
  $bhatthipartyId      = "";
  $bhatthipartyName    = "";
  $msg = "";
  $i = 0;
  $selectQueryBhatthipartyName = "SELECT bhatthipartyId,bhatthipartyName 
                                    FROM bhatthiparty
                                   ORDER BY bhatthipartyName DESC";
  $selectQueryBhatthipartyNameResult = mysql_query($selectQueryBhatthipartyName);
  $bhatthipartyNameRow = mysql_num_rows($selectQueryBhatthipartyNameResult);
  if($bhatthipartyNameRow > 0)
  {
    while($bhatthipartyNameRow = mysql_fetch_array($selectQueryBhatthipartyNameResult))
    {
      $bhatthipartyIdCount  .= $bhatthipartyNameRow['bhatthipartyId'].",";
      $bhatthipartyId[$i]    = $bhatthipartyNameRow['bhatthipartyId'];
      $bhatthipartyName[$i]  = $bhatthipartyNameRow['bhatthipartyName'];
      $i++;
    }
  }
  else
  {
    $msg = "<center><div class='clean-gray'>Bhatthi Party Not Found ...!!!</div></center>";
  }
  $smarty = new Smarty;
  require('bottom.php');
  $smarty->assign("l_listBhatthiParty",$l_listBhatthiParty);
  $smarty->assign("l_bhatthipartyName",$l_bhatthipartyName);

  $smarty->assign("i",$i);
  $smarty->assign("msg",$msg);
  $smarty->assign("bhatthipartyIdCount",$bhatthipartyIdCount);
  $smarty->assign("bhatthipartyId",$bhatthipartyId);
  $smarty->assign("bhatthipartyName",$bhatthipartyName);
  $smarty->display('bhatthiPartyList.tpl');
?>
